Intent to change: Pointer Boundary events start to be fired without pointer move after a layout change

41 views
Skip to first unread message

Masayuki Nakano

unread,
May 28, 2025, 7:58:26 AM (6 days ago) May 28
to dev-pl...@mozilla.org, Olli Pettay, Hsin-Yi Tsai, Brian Birchill Birchill Birtles

Summary: Previously, Pointer Events defined that pointer boundary events such as `pointerover`, `pointerenter`, `pointerout` and `pointerleave` are fried as a preprocessing of dispatching a pointer event. E.g., when the element underneath the pointer is changed by a layout change, e.g., by a DOM mutation, a style change or a scroll, pointer boundary events should have been fired before dispatching next `pointermove`, `pointerdown` or `pointerup`, etc. However, now, the spec defines that the pointer boundary events should be fired as soon as possible (but allowed to dispatch after a tick). Therefore, we need to change our implementation for conforming to the new spec.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1966551

Specification: https://w3c.github.io/pointerevents/#boundary-events-caused-by-layout-changes

Platform coverage: Only desktop due to bug 1633450

Preference: dom.event.pointer.boundary.dispatch_when_layout_change

DebTools bug: N/A

Other browsers: Chrome already shipped the new behavior, Safari does not.

web-platform-tests: https://wpt.fyi/results/pointerevents/pointerevent_pointerout_no_pointer_movement.html?label=experimental&label=master&aligned

-- 
Masayuki Nakano <masa...@d-toybox.com>
Working on DOM, Events, editor and IME handling for Gecko
Reply all
Reply to author
Forward
0 new messages